<?php 
    session_start();

    if (!isset($_SESSION['is_logged_in'])) {
        header("Location:index.php?url=" . $_SERVER["REQUEST_URI"]);
        die();
    }
    else
    	include("php/conexion.php");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html>
	<head>
		<meta name="description" content="Torneo Comercial de Basket">
		<meta name="keywords" content="torneo.basket,comercial,amateur,vector,it,vector-it,cordoba,argentina">
		<meta name="author" content="Vector-IT">
	    <title>Torneo TCB</title>
	    <link rel="shortcut icon" href="imagenes/favicon.ico" type="image/x-icon" />
	    <link rel="icon" href="imagenes/favicon.ico" type="image/x-icon" />
		<link rel="image_src" href="http://www.torneotcb.com.ar/imagenes/logo.png" />
		<link rel="stylesheet" type="text/css" href="css/tcb.css">
	    
        <meta property="og:title" content="Torneo TCB" />
		<meta property="og:url" content="http://www.torneotcb.com.ar" />
		<meta property="og:description" content="Torneo Comercial de Basket" />
		<meta property="og:image" content="http://www.torneotcb.com.ar/imagenes/logo.png" />
		
	    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<link rel="stylesheet" type="text/css" href="jquery/css/custom-theme/jquery-ui-1.10.3.custom.min.css" />
		<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
		<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
		<!--
		<script src="jquery/js/jquery-1.9.1.js"></script>
		<script src="jquery/js/jquery-ui-1.10.3.custom.js"></script>
		--> 
		
		<script src="js/publicos.js"></script>	
	    
		<!-- Google Hosted jQuery Core -->
		<!-- 
		<script src="http://www.google.com/jsapi"></script>
		<script>google.load("jquery", "1");</script> -->
		<script src="js/jquery.ez-bg-resize.js" type="text/javascript" charset="utf-8"></script>
		<script>
			$(document).ready(function() {
				
				var BGImageArray = ["bg.jpg","bg2.jpg","bg5.jpg","bg6.jpg","bg7.jpg","bg8.jpg"];
				var BGImage = BGImageArray[Math.floor(Math.random()*BGImageArray.length)];
	
				$("body").ezBgResize({
					img     : "imagenes/fondos/" + BGImage, // Relative path example.  You could also use an absolute url (http://...).
					opacity : 1, // Opacity. 1 = 100%.  This is optional.
					center  : true // Boolean (true or false). This is optional. Default is true.
				});
			});
		</script>
		<script type="text/javascript">
			function armarPagina() {
				cargarEncabezado(function(){return true;});
			}

			function cargarEncabezado(callback) {
                if (window.XMLHttpRequest)
                {// code for IE7+, Firefox, Chrome, Opera, Safari
                    xmlhttp=new XMLHttpRequest();
                }
                else
                {// code for IE6, IE5
                    xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
                }
    
                xmlhttp.onreadystatechange=function()
                {
                    if (xmlhttp.readyState==4 && xmlhttp.status==200) {
                    	document.getElementById("divEncabezado").innerHTML = xmlhttp.responseText;
                    	callback();
                    }
                };
                xmlhttp.open("POST","encabezado.php",true);
                xmlhttp.send();
			}
		</script>
	</head>
	<body onload="armarPagina();">
		<?php include_once("php/analyticstracking.php");?>
	
		<div class="contenedor">
		    <div class="encabezado" id="divEncabezado">
		    	<img src="imagenes/logo_viejo.png" />
		    	<img src="imagenes/spinner.gif" style="width: 16px; height: 16px;" />Actualizando...
			</div>
	        	    
	    	<div class="contenido">
		        <div id="frmNuevo">
		        </div>
		        <div id="txtHint"></div>
	    	</div>
	
	    	<div id="pie" class="pie">
		    </div>
	    
		</div>
	</body>
</html>